package servlet;

import java.io.IOException;
import java.util.Vector;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import schoolDAO.MemberDAO;

public class NameCheckServlet extends HttpServlet {

	protected void doPost(HttpServletRequest req,HttpServletResponse resp)	
			throws ServletException, IOException{
			String username	=req.getParameter("username");
			MemberDAO md=new MemberDAO();
		    boolean flag=md.findByName(username);
			if(flag)			
				resp.getWriter().print("true");			
			else
				resp.getWriter().print("false");		
	}
}
	
